home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Diamond Collection / The Diamond Collection (Software Vault)(Digital Impact).ISO / cdr13 / aurora2c.zip / FULLDATE.AML < prev    next >
Text File  |  1995-04-07  |  2KB  |  62 lines

  1.  
  2. // ───────────────────────────────────────────────────────────────────
  3. // The Aurora Editor v2.0
  4. // Copyright 1993-1995 nuText Systems. All Rights Reserved Worldwide.
  5. //
  6. // Get Date and Time in full-format
  7. //
  8. // This macro displays the current date in full-name format,
  9. // i.e. "2:18pm Saturday, January 7, 1995"
  10. // ───────────────────────────────────────────────────────────────────
  11.  
  12.   // compile time macros and function definitions
  13.   include  bootpath "define.aml"
  14.  
  15.   // get date and time in raw format
  16.   rawtime = getrawtime
  17.  
  18.   // note: getrawtime returns "YYYYMMDDWhhmmssuu"  where:
  19.  
  20.   // YYYY = year                    // hh = hour (0-23)
  21.   // MM   = month (1-12)            // mm = minutes (0-59)
  22.   // DD   = day (1-31)              // ss = seconds (0-59)
  23.   // W    = day of week (0=sunday)  // uu = hundredths of a sec (0-99)
  24.  
  25.   full_date =
  26.  
  27.       gettime + ' ' +
  28.  
  29.       // get day of the week
  30.       case rawtime [9]
  31.         when '0' "Sunday"         when '4' "Thursday"
  32.         when '1' "Monday"         when '5' "Friday"
  33.         when '2' "Tuesday"        when '6' "Saturday"
  34.         when '3' "Wednesday"
  35.       end
  36.  
  37.       + ", " +
  38.  
  39.       // get month
  40.       case rawtime [5:2]
  41.         when "01" "January"       when "07" "July"
  42.         when "02" "February"      when "08" "August"
  43.         when "03" "March"         when "09" "September"
  44.         when "04" "April"         when "10" "October"
  45.         when "05" "May"           when "11" "November"
  46.         when "06" "June"          when "12" "December"
  47.       end
  48.  
  49.       // get day of the month and the year
  50.       + ' ' + rawtime [7:2] + ", " + rawtime [1:4]
  51.  
  52.  
  53.   if wintype? "edit" then
  54.     if (okbox  full_date + ":  Enter into text?"  "Full Date") == "Ok" then
  55.       write full_date
  56.     end
  57.   else
  58.     msgbox  full_date  "Full Date"
  59.   end
  60.  
  61.  
  62.